<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F.algorithms演示</title>
<style type="text/css">
#rbox{width:150px; height:150px; background-color:red; position:absolute;}
#gbox{width:100px; height:100px;background-color:green; position:absolute;}
#bbox{width:50px; height:50px;background-color:blue; position:absolute;}
</style>
<script type="text/javascript" src="../../1st.js"></script>
<script type="text/javascript" src="../../1st.algorithms.js"></script>
</head>
<body>
<div id="rbox" style="left:0px;top:0px;"></div>
<div id="gbox" style="left:210px;top:210px;"></div>
<div id="bbox" style="left:120px;top:120px;"></div>

<script type="text/javascript">
function iscross(id1, id2){
	var o1 = getpos(id1);
	var o2 = getpos(id2);
	alert(F.iscross(o1,o2));
}
function getpos(id){
	var o = F(id).rect(1);
	return {x1:o.x, y1:o.y, x2:o.x+o.w, y2:o.y+o.h};
}
iscross("rbox", "gbox");
iscross("rbox", "bbox");


var a = F.bubble([2,3,1,8,6,7,5,4]);
alert(a);
</script>
</body>
</html>